-- background: 10760 from stack: in -- bmap block id: 11069 -- flags: 4000 -- background id: 0 -- name: JukeBox ----- HyperTalk script ----- on idle if visible of bg btn "playing" is false then if visible of cd fld "AutoMusiconHelp" is false then send FlashMe to bg btn "select" end if end if pass idle end idle on mouseDown global FieldNo, LineNo, JBInst, JBTempo cleanScreen if name of target contains "bkgnd button" then if number of target ≥ 1 and number of target ≤15 then put "A,B,C,D,E,F,G,H,J,K" into FieldList if number of target ≥1 and number of target ≤ 10 then put number of target into x put 27020 into y else if number of target ≥ 11 and number of target ≤ 15 then put (number of target - 10) into x put 26020 into y end if end if if char 4 of icon of target = 1 or char 4 of icon of target = 4 then put y + x into x if x is 27030 then put 27020 into x set icon of target to x put x + 10 into x set icon of target to x play "click" if y is 27020 then repeat with i = 1 to 10 get icon of bg btn i if number of target is not i then if char 4 of it is 3 then put 2 into char 4 of it set icon of bg btn i to it put 1 into char 4 of it set icon of bg btn i to it play "click2" end if end if end repeat repeat with i = 11 to 15 get icon of bg btn i if char 4 of it > 1 then put (i - 10) into LineNO put number of target into FieldNo put item FieldNo of FieldList into FieldNo if optionKey() is not down then setUp else set cursor to 4 set visible of cd fld (fieldNo &LineNo) to not visible of cd fld (fieldNo &LineNo) resetBGB exit mouseDown end if cleanUp exit repeat end if end repeat end if if y is 26020 then repeat with i = 11 to 15 get icon of bg btn i if number of target is not i then if char 4 of it is 3 then put 2 into char 4 of it set icon of bg btn i to it put 1 into char 4 of it set icon of bg btn i to it play "click2" end if end if end repeat repeat with i = 1 to 10 get icon of bg btn i if char 4 of it > 1 then put i into FieldNO put (number of target - 10) into LineNO put item FieldNo of FieldList into FieldNo if optionKey() is not down then setUp else set cursor to 4 set visible of cd fld (fieldNo &LineNo) to not visible of cd fld (fieldNo &LineNo) resetBGB exit mouseDown end if cleanUp exit repeat end if end repeat end if end if end if end if end mouseDown on setup global FieldNo, LineNo, JBInst, JBTempo,JBTempTempo set cursor to 17 get line 2 of cd fld (fieldNo & LineNo) if JBInst is empty then put item 1 of it into JBInst end if if JBTempo is empty or JBTempo < 30 then put empty into JBTempo put item 2 of it into JBTempo put "Yes" into JBTempTempo end if put fieldNo &LineNo into bg fld 1 lock screen hide cd picture show bg btn "Playing" put JBTempo into bg fld "TempoField" put JBInst into bg fld "InstrumentField" show bg fld "InstrumentField" show bg fld 1 hide cd btn "Hider" unlock screen with iris open fast end setup on cleanUp global FieldNo, LineNo, JBInst, JBTempo, JBTempTempo resetBGB play "click2" get rect of bg btn "TempoBarBtn" barbutton -1,1000,0,JBTempo wait 1 second repeat with i = 3 to number of lines of cd fld (fieldNo &LineNo) put line i of cd fld (fieldNo &LineNo) into tempSong play JBInst tempo JBTempo tempSong wait until the sound is "Done" if mouse() is "down" then exit repeat end repeat lock screen hide bg fld 1 hide bg btn "Playing" hide bg fld "InstrumentField" show cd picture if icon of bg btn "Custom" is not 28033 then show cd btn "Hider" end if unlock screen play "Click2" set cursor to hand SongCountWks if icon of bg btn "Custom" is not 28033 then put empty into JBTempo put empty into JBInst put empty into bg fld "TempoField" else if JBTempTempo is "Yes" then put empty into JBTempTempo put empty into JBTempo put empty into bg fld "TempoField" end if end if end cleanUp on SongCountWks global SongCounter put SongCounter + 1 into SongCounter if SongCounter >12 and SongCounter < 24 then lock screen set icon of bg btn "ToBar" to 20082 unlock screen with dissolve end if if SongCounter ≥24 then lock screen set icon of bg btn "ToBar" to 20083 unlock screen with dissolve end if end SongCountWks on resetBGB lock screen repeat with i = 1 to 15 if char 4 of icon of bg btn i > 1 then set icon of bg btn i to (char 1 to 3 of icon of bg btn i) &1 &char 5 of icon of bg btn i end if end repeat unlock screen play "Click2" end resetBGB on doMenu whichItem global menuInstList if whichItem is in "Back,Recent,First,Prev,Next,Last" then get random(number of items of menuInstList) play (item it of menuInstList) answer "Please click on the glass to return to the bar." cleanScreen else if whichItem is in "New Card,Delete Card,Cut Card,Paste Card," &"New Button,New Field,New Background,Find..." then get random(number of items of menuInstList) play (item it of menuInstList) answer "That menu choice is not appropriate at this time." cleanScreen else pass doMenu end if end doMenu on arrowKey end arrowKey -- Portions of Automusicon created by and copyrighted 1988, by -- Philip A. Mohr, Jr. -- If this card is used as the basis for an expanded version -- that you plan to distribute, all I expect as recompense is that a -- copy of your completed stack be uploaded to CompuServ or Genie. -- Append to, but please don't remove, this notice. -- Portions of this stack ©1988 by Philip A. Mohr, Jr. Permission is -- hereby granted for its non-commercial use and distribution. -- part 1 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=400 top=28 right=56 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 27011 / 27011 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 2 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=400 top=55 right=83 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 27012 / 27012 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 3 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=400 top=82 right=110 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 27013 / 27013 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 4 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=400 top=109 right=137 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 27014 / 27014 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 5 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=400 top=136 right=164 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 27015 / 27015 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 33 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=430 top=28 right=56 bottom=463 -- title width / last selected line: 0 -- icon id / first selected line: 27016 / 27016 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 34 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=430 top=55 right=83 bottom=463 -- title width / last selected line: 0 -- icon id / first selected line: 27017 / 27017 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 35 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=430 top=82 right=110 bottom=463 -- title width / last selected line: 0 -- icon id / first selected line: 27018 / 27018 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 36 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=430 top=109 right=137 bottom=463 -- title width / last selected line: 0 -- icon id / first selected line: 27019 / 27019 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 37 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=430 top=136 right=164 bottom=463 -- title width / last selected line: 0 -- icon id / first selected line: 27010 / 27010 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 8 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=465 top=28 right=56 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 26011 / 26011 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 9 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=465 top=55 right=83 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 26012 / 26012 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 10 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=465 top=82 right=110 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 26013 / 26013 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 11 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=465 top=109 right=137 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 26014 / 26014 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 12 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=465 top=136 right=164 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 26015 / 26015 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 44 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=429 top=166 right=190 bottom=466 -- title width / last selected line: 0 -- icon id / first selected line: 28011 / 28011 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseDown cleanScreen global JBInst,JBTempo set icon of target to 28012 set icon of target to 28013 play "Click2" resetBGB if visible of cd btn "Hider" is false then set icon of target to 28013 lock screen show cd btn "Hider" if visible of bg fld "instrumentField" is true then hide bg fld "SelectField" hide bg btn "Playing" show cd picture hide bg fld "InstrumentField" end if unlock screen with barn door close play "Click2" lock screen set icon of target to 28011 set icon of bg btn "Custom" to 28031 unlock screen set icon of bg btn "Standard" to 28022 set icon of bg btn "Standard" to 28023 play "Click2" put empty into JBInst put empty into JBTempo put empty into bg fld "TempoField" else if JBInst is not empty then put empty into JBInst if JBTempo is not empty then put empty into JBTempo set icon of target to 28012 set icon of target to 28011 end if end mouseDown -- part 47 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=402 top=238 right=259 bottom=495 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Instruments ----- HyperTalk script ----- on mouseDown global InstTimerTemp cleanScreen put the ticks into InstTimerTemp Global JBInst,menuInstList if optionKey() is not down then Get HPopupMenu(menuInstList,0, 200, 399) put empty into JBInst if it is not zero then set cursor to 17 Put Item 1 of it into TheLine put Item 2 of it into TheItem put (item TheItem of line TheLine of menuInstList) into JBInst put JBInst into bg fld "InstrumentField" show bg fld "InstrumentField" play JBInst wait until the sound is "Done" hide bg fld "InstrumentField" put empty into bg fld "InstrumentField" end if else put JBInst into bg fld "InstrumentField" show bg fld "InstrumentField" wait until mouse() is up set cursor to 17 play JBInst wait until the sound is "Done" hide bg fld "InstrumentField" put empty into bg fld "InstrumentField" end if end mouseDown on mouseUp global InstTimerTemp if the ticks - InstTimerTemp < 50 then answer "This is a " "e &"mouseDown" "e &" button that invokes a pop-up menu. Hold the mouse button" &" down until the menu appears." end if end mouseUp -- part 50 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=463 top=307 right=336 bottom=496 -- title width / last selected line: 0 -- icon id / first selected line: 20098 / 20098 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp GoHome end mouseUp -- part 51 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=406 top=305 right=333 bottom=432 -- title width / last selected line: 0 -- icon id / first selected line: 20081 / 20081 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ToBar ----- HyperTalk script ----- on mouseUp set cursor to 16 visual zoom in go cd "Bar" set icon of target to 20081 end mouseUp -- part 52 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=411 top=205 right=223 bottom=487 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Select ----- HyperTalk script ----- on mouseUp --spoiler end mouseUp on FlashMe flasher 1, the rect of me end FlashMe -- part 65 (button) -- low flags: 00 -- high flags: 4000 -- rect: left=432 top=205 right=223 bottom=487 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Select2 ----- HyperTalk script ----- on mouseUp set hilite of target to true end mouseUp -- part 53 (button) -- low flags: 80 -- high flags: C002 -- rect: left=411 top=205 right=223 bottom=468 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Playing ----- HyperTalk script ----- on mouseUp set hilite of me to true hide me end mouseUp -- part 54 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=465 top=205 right=223 bottom=487 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: SelectField -- part 55 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=404 top=282 right=294 bottom=494 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: TempoBarBtn ----- HyperTalk script ----- on mousedown global JBTempo cleanScreen if optionKey() is not down then set cursor to 2 get rect of me BarButton -1,1000,0 put result() into bg fld "TempoField" if bg fld "TempoField" > 30 then TempoTest else put empty into JBTempo end if else ask "The tempo for the next song?" with JBTempo if it is not empty then repeat with i = 1 to number of chars of it if char i of it is not in "1234567890" then beep answer "“" & char i of it &"” is not a number. Please try again. " put empty into bg fld "TempoField" exit mouseDown end if end repeat if the value of it > 5000 then answer "The song would play so rapidly it would sound like a beep. " &"Please try again." end if if it is not "OK" then put it into bg fld "TempoField" if it is not "0" then TempoTest end if end if else put empty into bg fld "TempoField" end if end if end mousedown on TempoTest global JBTempo, JBInst set cursor to 17 if JBInst is empty then put "Harpsichord" into JBInstTemp else put JBInst into JBInstTemp end if put bg fld "TempoField" into JBTempo play JBInstTemp tempo JBTempo "A A A A" wait until the sound is "done" end TempoTest -- part 56 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=452 top=265 right=280 bottom=495 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: TempoField -- part 60 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=166 right=190 bottom=435 -- title width / last selected line: 0 -- icon id / first selected line: 28023 / 28023 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Standard ----- HyperTalk script ----- on mouseDown cleanScreen global JBInst,JBTempo,DialogHilite if icon of target is not 28023 then set icon of target to 28022 set icon of target to 28023 play "Click2" lock screen show cd btn "Hider" unlock screen with barn door close play "Click2" set icon of bg btn "Custom" to 28032 set icon of bg btn "Custom" to 28031 play "Click2" put empty into JBInst put empty into JBTempo put empty into bg fld "TempoField" put empty into DialogHilite end if end mouseDown -- part 61 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=460 top=166 right=190 bottom=497 -- title width / last selected line: 0 -- icon id / first selected line: 28031 / 28031 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Custom ----- HyperTalk script ----- on mouseDown cleanScreen if icon of target is not 28033 then set icon of target to 28032 set icon of target to 28033 play "Click2" lock screen hide cd btn "Hider" unlock screen with barn door open play "Click2" set icon of bg btn "Standard" to 28022 set icon of bg btn "Standard" to 28021 play "Click2" end if end mouseDown -- part 66 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=439 top=307 right=334 bottom=461 -- title width / last selected line: 0 -- icon id / first selected line: 20074 / 20074 -- text alignment: 1 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: AutoMusiconHelp ----- HyperTalk script ----- on mouseUp set cursor to 4 cleanScreen if optionKey() is not down then lock screen show cd fld "AutoMusiconHelp" unlock screen with zoom out else lock screen set visible of cd btn "Line Length" to not visible of cd btn "Line Length" set visible of cd btn "Import Music" to visible of cd btn "Line Length" set visible of cd btn "Export Music" to visible of cd btn "Line Length" unlock screen end if end mouseUp -- part 58 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=404 top=240 right=257 bottom=493 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: InstrumentField -- part 67 (button) -- low flags: 80 -- high flags: 0000 -- rect: left=397 top=24 right=301 bottom=501 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: JBSpoiler ----- HyperTalk script ----- on mouseDown answer "There isn't enough free space on this disk. " &"The changer arm will get hung up. " &"Please move me to a disk that has least 100K free." with "OK" end mouseDown